<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>
            首页设置 <a href="{:U('Poster/push?className=HomePage')}" class="btn confirm ajax-get">上推数据</a>
        </h2>
    </div>
    <div class="tab-wrap">
        <div class="tab-content">
            <form id="form" action="{:U('')}" method="post" class="form-horizontal">
                <div id="tab2" class="tab-pane tab2 in">
                    
                    <div class="form-item cf">
                        <label class="item-label">大海报<span class="check-tips"><a href='__APP__/Admin/Poster/index1.html' class='btn' id="adddhb">维护数据</a></span></label>
                        <div class="controls">
                            <div style="border: #000 1px solid;width: 70%" class='data-table table-striped'>
                                
                                <table >
                                    <thead>
                                        <tr>
                                            <th>海报类型</th>
                                            <th>图片</th>
                                            <th>规格编号</th>
                                        </tr>
                                    </thead>
                                    <tbody id="tbodydhb">
                                        <volist name="_list1" id="vo1">
                                            <tr>
                                                <td>
                                                    <select>
                                                        <option value="">请选择...</option>
                                                        <option value="1" <eq name="vo1.isType" value="1"> selected</eq>>单个商品</option>
                                                        <option value="2" <eq name="vo1.isType" value="2"> selected</eq>>活动海报</option>
                                                    </select>
                                                </td>
                                                <td>
                                                    <img src="{$vo1.fileUrl}" width="80" height="30">
                                                </td>
                                                <td>
                                                    {$vo1.specId}
                                                </td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                            
                            
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-item cf">
                        <label class="item-label">小海报<span class="check-tips"><a href='__APP__/Admin/Poster/index2.html' class='btn' id="addxhb">维护数据</a></span></label>
                        <div class="controls">
                            <div style="border: #000 1px solid;width: 70%" class='data-table table-striped'>
                                <table >
                                    <thead>
                                        <tr>
                                            <th>图片地址</th>
                                        </tr>
                                    </thead>
                                    <tbody id="tbodyxhb">
                                        <volist name="_list2" id="vo2">
                                            <tr>
                                                <td>
                                                    <img src="{$vo2.fileUrl}" width="80" height="30">
                                                </td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                            
                            
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-item cf">
                        <label class="item-label">果然推荐</label>
                        <div class="controls">
                            <div style="border: #000 1px solid;width: 70%" class='data-table table-striped'>
                                <table >
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>商品名称</th>
                                            <th>商品规格</th>
                                            <th>选择商品</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <volist name="_list3" id="vo3">
                                            <tr>
                                                <td>
                                                    {$vo3.id}
                                                </td>
                                                <td>
                                                    {$vo3.pname}
                                                </td>
                                                <td>
                                                    {$vo3.name}
                                                </td>
                                                <td>
                                                    <select data-form="select2" style="height: 30px; width:207px;" name="specid" onChange="edit({$vo3.id},this.value)" >
                                                        <option value=“”>请选择...</option>
                                                        <volist name="_prolist" id="pl">
                                                            <option value={$pl.id},{$pl.fileUrl}>{$pl.pname}({$pl.name})</option>
                                                        </volist>
                                                    </slect>
                                                </td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-item cf">
                        <label class="item-label">果然特价</label>
                        <div class="controls">
                            <div style="border: #000 1px solid;width: 70%" class='data-table table-striped'>
                                <table >
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>商品名称</th>
                                            <th>商品规格</th>
                                            <th>选择商品</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <volist name="_list4" id="vo4">
                                            <tr>
                                                <td>
                                                    {$vo4.id}
                                                </td>
                                                <td>
                                                    {$vo4.pname}
                                                </td>
                                                <td>
                                                    {$vo4.name}
                                                </td>
                                                <td>
                                                    <select data-form="select2" style="height: 30px; width:207px;" name="specid" onChange="edit({$vo4.id},this.value)">
                                                        <option value=“”>请选择...</option>
                                                        <volist name="_prolist" id="pl">
                                                            <option value={$pl.id},{$pl.fileUrl}>{$pl.pname}({$pl.name})</option>
                                                        </volist>
                                                    </slect>
                                                </td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    
                </div>
            </form>
        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        
        function edit(id,str){
            var specid = str.substr(0,str.indexOf(','));
            
            var fileUrl = str.substr(str.indexOf(',')+1);
            
            $str = "__URL__/edit&id="+id+"&specid="+specid+"&fileUrl="+fileUrl;
            window.location.href = $str;
        }
    </script>
</block>